#include <iostream>
#include <string>
#include <vector>
using namespace std;
class Solution {
public:
    vector<string> buildArray(vector<int>& target, int n) {
        vector<string> retarr;
        int count = 1;
        for (int i = 0; i < target.size(); ++i)
        {
            while (target[i] != count)
            {
                retarr.push_back("Push");
                retarr.push_back("Pop");
                count++;
            }
            retarr.push_back("Push");
            count++;
        }
        return retarr;
    }
};
int main()
{
    vector<int> num = { 1, 2 };
    vector<string> retstr = Solution().buildArray(num, 4);
    for (const auto& str : retstr)
        cout << str << " ";
	return 0;
}